export default {
    // 删除
    del(state, payload) {
        state.info.splice(payload, 1)
    },
    // 搜索
    search(state, payload) {
        if (!payload.trim()) {
            return
        }
        state.info.forEach(item => {
            if (item.title.indexOf(payload) == -1) {
                item.is_show = false
            }
        })
    },
    searchTxtChange(state, payload) {
        if (payload == '') {
            state.info.forEach(item => {
                item.is_show = true
            })
        }
    }
}